<div class="row">
    <div class="span9">

        <div class="page-header">        
            <h3><% if(relationship._id){ %>
                Editar relación:<%= relationship.fromNodeName %> <%= relationship._type %> <%= relationship.toNodeName %>
                <%} else {%>Nueva relación <% } %>
            </h3>
        </div>

        <div class="row span9">
            <div class="span3">De Nodo</div>
            <div class="span2">Tipo de Nodo</div>
            <div class="span3">A Nodo</div>
        </div>

        <% if(!relationship._id){ %>
        <form class="form-horizontal">
            <fieldset>
                <div class="row new-relationship">
                    <div class="input-prepend span3">
                        <span class="add-on">
                            <i class="icon-user"></i>
                        </span>
                        <input type="text" class="input-medium" id="_node-input" 
                               data-provide="typeahead" data-items="8" autocomplete="off" />
                        <button class="btn"><i class="icon-search" id="searchNode"></i></button>
                        <p class="help-block">Ingrese nodo de partida.</p>
                    </div>

                    <div class="input-prepend span2">
                        <span class="add-on">
                            <i class="icon-tag"></i>
                        </span>
                        <input type="text" class="input-small" id="_relType-input"
                               data-provide="typeahead" data-items="8" autocomplete="off" />
                        <button class="btn"><i class="icon-search" id="searchRelType"></i></button>
                        <p class="help-block">Ingrese nodo de llegada.</p>
                    </div>

                    <div class="input-prepend span3">
                        <span class="add-on">
                            <i class="icon-user"></i>
                        </span>
                        <input type="text" class="input-medium" id="_node-input"
                               data-provide="typeahead" data-items="8" autocomplete="off" />
                        <button class="btn"><i class="icon-search" id="searchNode"></i></button>
                        <p class="help-block">Ingrese nodo de llegada.</p>
                    </div>
                </div>

                <div class="form-actions">
                    <a class="btn save-btn">Guardar</a>
                    <a class="btn back-btn">Regresar</a>
                </div>

            </fieldset>
        </form>
        <% } else {%>

        <div class="row">
            <div class="span4">Atributo</div>
            <div class="span4">Valor</div>
        </div>

        <form class="form-horizontal">
            <fieldset>
                <div class="control-group" id="recordGroup">
                    <div class="btn-group span2" id="afterRow">
                        <button id="addButton" class="btn" type="button"><i class="icon-plus"></i>Agregar</button>
                    </div>
                </div>

                <div class="form-actions">
                    <a class="btn save-btn">Guardar</a>
                    <a class="btn back-btn">Regresar</a>
                </div>

            </fieldset>
        </form>

        <% } %>


    </div>
</div>
